package org.springblade.modules.admin.vo.rescue.map;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.Func;
import java.util.List;

/**
 * @Description 救援详情列表VO
 * @Author ysq
 * @Date 2024/3/8
 */
@Data
public class MapRescuePlanDetailVO {

	@ApiModelProperty(value = "项目id")
	private Long buildingId;

	@ApiModelProperty(value = "项目名称")
	private String buildingName;

	@ApiModelProperty(value = "救援工单数量")
	private Long rescueCount;

	@ApiModelProperty(value = "工单详情")
	List<MapRescuePlanDetailListVO> planDetailList;

	public Long getRescueCount() {
		if (Func.isNotEmpty(this.planDetailList)) {
			return planDetailList.stream().count();
		}
		return 0L;
	}
}
